<%@page
	import="eu.telecom_bretagne.RECRUT.data.model.DossierCandidature"%>
<%@page
	import="eu.telecom_bretagne.RECRUT.service.IServiceDossierCandidature"%>
<%@page import="eu.telecom_bretagne.RECRUT.data.model.Employe"%>
<%@page import="eu.telecom_bretagne.RECRUT.service.IServiceEmploye"%>
<%@page import="javax.naming.InitialContext"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
	InitialContext ctx = new InitialContext();
	IServiceDossierCandidature serviceDossierCandidature = (IServiceDossierCandidature) ctx
			.lookup(IServiceDossierCandidature.JNDI_NAME);
	IServiceEmploye serviceEmploye = (IServiceEmploye) ctx
			.lookup(IServiceEmploye.JNDI_NAME);

	int idD = Integer.parseInt(request.getParameter("idD"));
	DossierCandidature dossier = serviceDossierCandidature
			.lireDossierCandidature(idD);

	int idE = Integer.parseInt(request.getParameter("idE"));
	Employe employe = serviceEmploye.lireEmploye(idE);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Information sur dossier</title>
</head>
<body>
	<h1>Information sur un dossier</h1>
	<table>
		<tr>
			<td>ID</td>
			<td><%=dossier.getId()%></td>
		</tr>
		<tr>
			<td>Titre</td>
			<td><%=dossier.getTitreDossier()%></td>
		</tr>
		<tr>
			<td>Validation RH</td>
			<td><%=dossier.getValidationRH()%></td>
		</tr>
		<tr>
			<td>Validation DD</td>
			<td><%=dossier.getValidationDD()%></td>
		</tr>

	</table>
		<input type="submit" name="valider_rh" value="Valider le dossier par RH">
		<input type="submit" name="valider_dd" value="Valider le dossier par DD">

	<a href="liste_dossier.jsp?id=<%=dossier.getId()%>">Retour</a>
</body>
</html>